IRust Repl
Repl engine used by IRust to interpret rust code
The core is println!("{:?}", expression)
with tricks to conserve variables and context
Example:
use ;
let mut repl = new.unwrap;
repl.insert;
assert_eq!;
Checkout the examples and tests folders for more info.
Jupyter Kernel
A basic jupyer kernel is provided for demo https://github.com/sigmaSd/IRust/tree/master/crates/irust_repl/irustkernel, to use it:
- Compile
re
example withcargo build --examples --release
- Cp
re
to a folder in your$PATH
so it can be used by the kernel,cp target/release/examples/re $folder_in_path
- Install the kernel with
jupyter kernelspec install --user irustkernel
, it should be listed now injupyter kernelspec list
- Cd to irustkernel, and run jupyter,
jupyter lab .
, note: cding into irustkernel is important so python can find the moduleirust
(irust.py), the path is hardcoded inkernel.json
That's it! irust.ipynb
is provided as an example